package com.idealighter.game.recharge.convert;

import com.idealighter.game.core.convert.DateLongConvert;
import com.idealighter.game.dictionary.domain.RechargeItemDomain;
import com.idealighter.game.recharge.dto.RechargeItemDto;
import com.idealighter.game.recharge.dto.RechargeRecordDto;
import com.idealighter.game.server.db.datadb.generate.domain.RechargeRecordDomain;

import java.util.List;

import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

@Mapper(uses = DateLongConvert.class)
public interface RechargeConvert {

  RechargeConvert INSTANCE = Mappers.getMapper(RechargeConvert.class);

  RechargeItemDto toRechargeItemDto(RechargeItemDomain domain);

  List<RechargeItemDto> toRechargeItemDtos(List<RechargeItemDomain> domains);

  @Mapping(target = "orderNo", source = "tradeNo")
  RechargeRecordDto toRechargeRecordDto(RechargeRecordDomain pojo);

  List<RechargeRecordDto> toRechargeRecordDtos(List<RechargeRecordDomain> pojos);
}
